<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>孟老师QQ-574549426-暗号：JAVA</title>
    <script src="vue.js" type="text/javascript"></script>
</head>
<body>
    <div id="app">
        <input type="button" value="点击" v-on:click="greet(666)">
        <!--v-on的简化写法-->
        <input type="button" value="点击2" @click="greet(888)">
    </div>
<script type="text/javascript">
    var vm=new Vue({
        el:"#app",
        data:{
        },
        methods:{
            greet:function(num){
                alert(num)
            }
        }
    })
</script>
</body>
</html>